//
//  main.m
//  AnimalProject
//
//  Created by Yiqiao on 15/4/20.
//  Copyright (c) 2015年 Yiqiao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Dog.h"
#import "Animal.h"
#import "Bird.h"
#import "Person.h"

int main(int argc, const char * argv[]) {
    Animal *animal1 = [[Animal alloc]initWithAge:11 AndColor:@"yellow" AndHeight:120];
    NSLog(@"%@",[animal1 description]);
    
    Animal *animal2 = [[Animal alloc]init];
    [animal2 set];
    NSLog(@"%@",[animal2 description]);
    
    Animal *animal3 = [[Animal alloc]initWithAge:123 AndColor:@"green" AndHeight:33];
    NSLog(@"%@",[animal3 description]);
    
    Bird *bird1 = [[Bird alloc]initWithAge:2 AndColor:@"white" AndHeight:22 AndSpeed:32];
    
    NSLog(@"%@",[bird1 description]);
    
    Dog *dog1 = [[Dog alloc]initWithAge:3 AndColor:@"grey" AndHeight:13 AndDistance:1232];
    
    NSLog(@"%@",[dog1 description]);
  
    Person *person = [[Person alloc]initWithName:@"curry" AndPersonAge:22 AndDogAge:2 AndColor:@"purple" AndHeight:66 AndDistance:1234];
    
    
    NSLog(@"%@",[person description]);
    
    
    NSInteger cmd = 0;
    NSLog(@"enter the time 123");

    scanf("%lu",&cmd);
    
    switch (cmd) {
        case 9:
            [dog1 run];
            [person.mydog run];
            break;
        case 10:
            [dog1 ball];
            break;
        case 11:
            [dog1 bark];
            break;
        default:
            NSLog(@"pangzi");
            break;
    }
    
    
    return 0;
}
